package com.example.fashionshoes.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.fashionshoes.exception.BusinessException;
import com.example.fashionshoes.pojo.po.Order;
import com.example.fashionshoes.pojo.vo.OrderDetailVo;
import com.example.fashionshoes.pojo.vo.OrderVo;
import com.example.fashionshoes.pojo.vo.ToPayVo;

import java.util.List;

public interface OrderService extends IService<Order> {
    /**
     * 生成订单-结算页
     * @return 地址簿和商品
     */
    ToPayVo getCheckOutInfo(Integer userId) throws BusinessException;

    /**
     * 生成订单
     * @param order 参数
     * @return 生成的订单
     */
    OrderVo toPay(Order order) throws BusinessException;

    /**
     * 获取订单列表
     * @return 订单列表
     */
    List<OrderVo> getOrderList();

    /**
     * 根据订单编号查询订单信息
     * @param number 订单编号
     * @return 订单信息
     */
    OrderDetailVo getOrderDetail(String number) throws BusinessException;
}
